.class public Lcom/kwad/sdk/splashscreen/a/c;
.super Lcom/kwad/sdk/mvp/Presenter;

# interfaces
.implements Lcom/kwad/sdk/reward/a/a;


# instance fields
.field protected a:Lcom/kwad/sdk/splashscreen/b;

.field private b:Landroid/os/Handler;

.field private c:Landroid/widget/TextView;

.field private d:Landroid/widget/TextView;

.field private e:I

.field private f:I

.field private g:Lcom/kwad/sdk/core/response/model/AdInfo$AdPreloadInfo;

.field private h:J


# direct methods
.method public constructor <init>()V
    .locals 0

    invoke-direct {p0}, Lcom/kwad/sdk/mvp/Presenter;-><init>()V

    return-void
.end method

.method static synthetic a(Lcom/kwad/sdk/splashscreen/a/c;)V
    .locals 0

    invoke-direct {p0}, Lcom/kwad/sdk/splashscreen/a/c;->k()V

    return-void
.end method

.method static synthetic b(Lcom/kwad/sdk/splashscreen/a/c;)I
    .locals 0

    iget p0, p0, Lcom/kwad/sdk/splashscreen/a/c;->e:I

    return p0
.end method

.method static synthetic c(Lcom/kwad/sdk/splashscreen/a/c;)Landroid/os/Handler;
    .locals 0

    iget-object p0, p0, Lcom/kwad/sdk/splashscreen/a/c;->b:Landroid/os/Handler;

    return-object p0
.end method

.method private k()V
    .locals 5
    .annotation build Landroid/annotation/SuppressLint;
        value = {
            "SetTextI18n"
        }
    .end annotation

    iget v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->f:I

    invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J

    move-result-wide v1

    iget-wide v3, p0, Lcom/kwad/sdk/splashscreen/a/c;->h:J

    sub-long/2addr v1, v3

    long-to-int v2, v1

    div-int/lit16 v2, v2, 0x3e8

    sub-int/2addr v0, v2

    iput v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->e:I

    if-lez v0, :cond_0

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, " "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v1, p0, Lcom/kwad/sdk/splashscreen/a/c;->e:I

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    goto :goto_0

    :cond_0
    const-string v0, ""

    :goto_0
    iget-object v1, p0, Lcom/kwad/sdk/splashscreen/a/c;->d:Landroid/widget/TextView;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "\u8df3\u8fc7"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    return-void
.end method


# virtual methods
.method protected a()V
    .locals 4

    invoke-super {p0}, Lcom/kwad/sdk/mvp/Presenter;->a()V

    invoke-virtual {p0}, Lcom/kwad/sdk/mvp/Presenter;->i()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/kwad/sdk/splashscreen/b;

    iput-object v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->a:Lcom/kwad/sdk/splashscreen/b;

    iget-object v0, v0, Lcom/kwad/sdk/splashscreen/b;->e:Lcom/kwad/sdk/core/view/AdBaseFrameLayout;

    const-string v1, "ksad_splash_preload_tips"

    invoke-static {v0, v1}, Lcom/kwad/sdk/c/s;->a(Landroid/view/View;Ljava/lang/String;)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->c:Landroid/widget/TextView;

    iget-object v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->a:Lcom/kwad/sdk/splashscreen/b;

    iget-object v0, v0, Lcom/kwad/sdk/splashscreen/b;->e:Lcom/kwad/sdk/core/view/AdBaseFrameLayout;

    const-string v1, "ksad_splash_skip_time"

    invoke-static {v0, v1}, Lcom/kwad/sdk/c/s;->a(Landroid/view/View;Ljava/lang/String;)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->d:Landroid/widget/TextView;

    new-instance v0, Landroid/os/Handler;

    invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V

    iput-object v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->b:Landroid/os/Handler;

    iget-object v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->a:Lcom/kwad/sdk/splashscreen/b;

    iget-object v0, v0, Lcom/kwad/sdk/splashscreen/b;->d:Lcom/kwad/sdk/core/response/model/AdTemplate;

    iget-object v0, v0, Lcom/kwad/sdk/core/response/model/AdTemplate;->adInfoList:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->isEmpty()Z

    move-result v0

    const/4 v1, 0x0

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->a:Lcom/kwad/sdk/splashscreen/b;

    iget-object v0, v0, Lcom/kwad/sdk/splashscreen/b;->d:Lcom/kwad/sdk/core/response/model/AdTemplate;

    iget-object v0, v0, Lcom/kwad/sdk/core/response/model/AdTemplate;->adInfoList:Ljava/util/List;

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/kwad/sdk/core/response/model/AdInfo;

    iget-object v0, v0, Lcom/kwad/sdk/core/response/model/AdInfo;->adPreloadInfo:Lcom/kwad/sdk/core/response/model/AdInfo$AdPreloadInfo;

    iput-object v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->g:Lcom/kwad/sdk/core/response/model/AdInfo$AdPreloadInfo;

    iget-object v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->a:Lcom/kwad/sdk/splashscreen/b;

    iget-object v0, v0, Lcom/kwad/sdk/splashscreen/b;->d:Lcom/kwad/sdk/core/response/model/AdTemplate;

    iget-object v0, v0, Lcom/kwad/sdk/core/response/model/AdTemplate;->adInfoList:Ljava/util/List;

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/kwad/sdk/core/response/model/AdInfo;

    iget-object v0, v0, Lcom/kwad/sdk/core/response/model/AdInfo;->adSplashInfo:Lcom/kwad/sdk/core/response/model/AdInfo$AdSplashInfo;

    iget v0, v0, Lcom/kwad/sdk/core/response/model/AdInfo$AdSplashInfo;->skipSecond:I

    iput v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->f:I

    iput v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->e:I

    :cond_0
    iget-object v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->g:Lcom/kwad/sdk/core/response/model/AdInfo$AdPreloadInfo;

    if-eqz v0, :cond_1

    iget-object v0, v0, Lcom/kwad/sdk/core/response/model/AdInfo$AdPreloadInfo;->preloadTips:Ljava/lang/String;

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_1

    iget-object v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->c:Landroid/widget/TextView;

    iget-object v2, p0, Lcom/kwad/sdk/splashscreen/a/c;->g:Lcom/kwad/sdk/core/response/model/AdInfo$AdPreloadInfo;

    iget-object v2, v2, Lcom/kwad/sdk/core/response/model/AdInfo$AdPreloadInfo;->preloadTips:Ljava/lang/String;

    goto :goto_0

    :cond_1
    iget-object v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->c:Landroid/widget/TextView;

    const-string v2, "\u5df2\u63d0\u524d\u52a0\u8f7d"

    :goto_0
    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J

    move-result-wide v2

    iput-wide v2, p0, Lcom/kwad/sdk/splashscreen/a/c;->h:J

    iget v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->f:I

    iput v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->e:I

    iget-object v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->a:Lcom/kwad/sdk/splashscreen/b;

    iget-object v0, v0, Lcom/kwad/sdk/splashscreen/b;->b:Ljava/util/List;

    invoke-interface {v0, p0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    invoke-direct {p0}, Lcom/kwad/sdk/splashscreen/a/c;->k()V

    iget v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->e:I

    if-lez v0, :cond_2

    iget-object v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->d:Landroid/widget/TextView;

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V

    iget-object v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->b:Landroid/os/Handler;

    new-instance v1, Lcom/kwad/sdk/splashscreen/a/c$1;

    invoke-direct {v1, p0}, Lcom/kwad/sdk/splashscreen/a/c$1;-><init>(Lcom/kwad/sdk/splashscreen/a/c;)V

    const-wide/16 v2, 0x1f4

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    :cond_2
    iget v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->e:I

    if-gez v0, :cond_3

    iget-object v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->d:Landroid/widget/TextView;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V

    :cond_3
    iget-object v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->d:Landroid/widget/TextView;

    new-instance v1, Lcom/kwad/sdk/splashscreen/a/c$2;

    invoke-direct {v1, p0}, Lcom/kwad/sdk/splashscreen/a/c$2;-><init>(Lcom/kwad/sdk/splashscreen/a/c;)V

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    return-void
.end method

.method public a_()V
    .locals 0

    return-void
.end method

.method public b_()V
    .locals 0

    return-void
.end method

.method protected c()V
    .locals 2

    invoke-super {p0}, Lcom/kwad/sdk/mvp/Presenter;->c()V

    iget-object v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->a:Lcom/kwad/sdk/splashscreen/b;

    iget-object v0, v0, Lcom/kwad/sdk/splashscreen/b;->b:Ljava/util/List;

    invoke-interface {v0, p0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    iget-object v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->b:Landroid/os/Handler;

    if-eqz v0, :cond_0

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacksAndMessages(Ljava/lang/Object;)V

    :cond_0
    return-void
.end method

.method public d()V
    .locals 4

    iget-object v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->b:Landroid/os/Handler;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacksAndMessages(Ljava/lang/Object;)V

    invoke-direct {p0}, Lcom/kwad/sdk/splashscreen/a/c;->k()V

    iget-object v0, p0, Lcom/kwad/sdk/splashscreen/a/c;->b:Landroid/os/Handler;

    new-instance v1, Lcom/kwad/sdk/splashscreen/a/c$3;

    invoke-direct {v1, p0}, Lcom/kwad/sdk/splashscreen/a/c$3;-><init>(Lcom/kwad/sdk/splashscreen/a/c;)V

    const-wide/16 v2, 0x1f4

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    return-void
.end method

.method public f()V
    .locals 0

    return-void
.end method
